package com.example.icongyou.bean;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

/**
 * 任务数据看板整体模型（对应后端 TaskDashboardVO）
 */
public class TaskDashboardBean implements Serializable {
    @SerializedName("courseId")
    private String courseId; // 课程ID

    @SerializedName("courseName")
    private String courseName; // 课程名称

    @SerializedName("taskItems")
    private List<TaskItemBean> taskItems; // 任务列表数据

    // Getter & Setter
    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public List<TaskItemBean> getTaskItems() {
        return taskItems;
    }

    public void setTaskItems(List<TaskItemBean> taskItems) {
        this.taskItems = taskItems;
    }

    /**
     * 单个任务数据模型（对应后端 TaskItemVO）
     */
    public static class TaskItemBean implements Serializable {
        @SerializedName("taskId")
        private long taskId; // 任务ID

        @SerializedName("taskName")
        private String taskName; // 任务名称

        @SerializedName("coreRequirements")
        private String coreRequirements; // 核心要求

        @SerializedName("deadline")
        private String deadline; // 截止时间（格式：2025-12-31 23:59:59）

        @SerializedName("submissionRate")
        private double submissionRate; // 提交率（百分比，保留两位小数）

        @SerializedName("viewCount")
        private int viewCount; // 查看次数

        @SerializedName("discussionCount")
        private int discussionCount; // 讨论次数

        // Getter & Setter
        public long getTaskId() {
            return taskId;
        }

        public void setTaskId(long taskId) {
            this.taskId = taskId;
        }

        public String getTaskName() {
            return taskName;
        }

        public void setTaskName(String taskName) {
            this.taskName = taskName;
        }

        public String getCoreRequirements() {
            return coreRequirements;
        }

        public void setCoreRequirements(String coreRequirements) {
            this.coreRequirements = coreRequirements;
        }

        public String getDeadline() {
            return deadline;
        }

        public void setDeadline(String deadline) {
            this.deadline = deadline;
        }

        public double getSubmissionRate() {
            return submissionRate;
        }

        public void setSubmissionRate(double submissionRate) {
            this.submissionRate = submissionRate;
        }

        public int getViewCount() {
            return viewCount;
        }

        public void setViewCount(int viewCount) {
            this.viewCount = viewCount;
        }

        public int getDiscussionCount() {
            return discussionCount;
        }

        public void setDiscussionCount(int discussionCount) {
            this.discussionCount = discussionCount;
        }
    }
}